package com.star.service.impl;

import com.star.context.BaseContext;
import com.star.entity.Business;
import com.star.mapper.BusinessMapper;
import com.star.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ShopServiceImpl implements ShopService {
    @Autowired
    private BusinessMapper businessMapper;

    public void setStatus(Integer status) {
        Long businessId = BaseContext.getCurrentId();
        Business business = businessMapper.getById(businessId);
        business.setStatus(status);
        businessMapper.update(business);
    }

}
